From: Dan Winship Date: Mon, 29 Aug 2011 17:02:42 +0000 (-0400) Subject: keyboard: switch to using the correct gsettings key for enable/disable X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7657 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=554ad4ef058fb25e920e4a6488337a91b7cfd7de;p=gnome-shell.git keyboard: switch to using the correct gsettings key for enable/disable https://bugzilla.gnome.org/show_bug.cgi?id=612662 --- diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in index 646b1901a..55db42a89 100644 --- a/data/org.gnome.shell.gschema.xml.in +++ b/data/org.gnome.shell.gschema.xml.in @@ -69,13 +69,6 @@ - - false - <_summary>Show the onscreen keyboard - <_description> - If true, display onscreen keyboard. - - 'touch' <_summary>Which keyboard to use diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 46a45b55b..9cfb90232 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -15,9 +15,11 @@ const Main = imports.ui.main; const MessageTray = imports.ui.messageTray; const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard'; -const SHOW_KEYBOARD = 'show-keyboard'; const KEYBOARD_TYPE = 'keyboard-type'; +const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications'; +const SHOW_KEYBOARD = 'screen-keyboard-enabled'; + // Key constants taken from Antler // FIXME: ought to be moved into libcaribou const PRETTY_KEYS = { @@ -207,6 +209,8 @@ Keyboard.prototype = { this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA }); this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged)); + this._a11yApplicationsSettings = new Gio.Settings({ schema: A11Y_APPLICATIONS_SCHEMA }); + this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._settingsChanged)); this._settingsChanged(); }, @@ -215,7 +219,7 @@ Keyboard.prototype = { }, _settingsChanged: function () { - this._enableKeyboard = this._keyboardSettings.get_boolean(SHOW_KEYBOARD); + this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD); if (!this._enableKeyboard && !this._keyboard) return; if (this._enableKeyboard && this._keyboard && diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index dac4ef047..4ded5a326 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -68,9 +68,9 @@ ATIndicator.prototype = { // 'screen-reader-enabled'); // this.menu.addMenuItem(screenReader); -// let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA, -// 'screen-keyboard-enabled'); -// this.menu.addMenuItem(screenKeyboard); + let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA, + 'screen-keyboard-enabled'); + this.menu.addMenuItem(screenKeyboard); let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL); this.menu.addMenuItem(visualBell);